﻿//-----------------------------------------------------------------------
// <copyright file="UserDataService.cs" company="SLWY Enterprises">
// * Copyright (C) 2017 四川商旅无忧科技有限公司 版权所有。
// * version : 1.0
// * author  : qinchaoyue
// * FileName: UserInfoService.cs
// * history : created by qinchaoyue 2017-12-14 11:30:07
// </copyright>
//-----------------------------------------------------------------------

namespace Slwy.Application.Services
{
    using Slwy.Application.Dtos;
    using Slwy.Application.Interfaces;
    using Slwy.Core.DomainService.IService;
    using Slwy.Core.Entities;
    using Slwy.Utility.Extensions;

    /// <summary>
    /// The user data service.
    /// </summary>
    public class UserDataService : IUserDataService
    {
        private readonly IUserInfoService _userInfoService;

        public UserDataService(IUserInfoService userInfoService)
        {
            this._userInfoService = userInfoService;
        }

        public int AddUserInfo(UserInfoDto inDto)
        {
            return this._userInfoService.InsertUserInfo(inDto.MapTo<UserInfoEntity>());
        }
    }
}
